var o = require("../../@babel/runtime/helpers/defineProperty"),
  t = require("@/storage/index"),
  e = t.storageLocation.name;
Page({
  behaviors: [t.storageLocation.behavior()],
  data: o({}, e, t.storageLocation.get()),
  onLoad: function () {},
  cancelMockLoc: function () {
    this.setData(o({}, e, null)),
      wx.showToast({ title: "清除成功", icon: "none" });
  },
  onMockLocTap: function () {
    var o = this;
    wx.getSetting({
      success: function () {
        o.chooseMockLocation();
      },
      fail: function (o) {
        console.log(o), wx.showToast({ title: "获取定位失败", icon: "none" });
      },
    });
  },
  chooseMockLocation: function () {
    var t = this;
    wx.chooseLocation({
      success: function (n) {
        t.setData(o({}, e, { latitude: n.latitude, longitude: n.longitude }));
      },
      fail: function (o) {
        console.log(o);
      },
    });
  },
});
